kancollefandomcom-20200213-history
User blog:Nanamin/Lua-based Fleet Composition Template
Notice This template has been replaced with the following: Template:NanaminFleetKai. The documentation on how to use it is also there. You may still ask questions about either one here, however. For Combined Fleets, please use Template:CombinedFleet instead. Updates (Newest First) This template has now been abandoned for the new Template:NanaminFleetKai. It has, however, been left as it last was so those who were using it do not experience problems. Fixed an issue with the calculating of fighter power. The first ship was not clearing out, so a good deal of fighter power was being loaded on the flagship (like 60% for a CV-heavy fleet). My old color scheme looked like cotton candy, so now it's blue-based because...I like blue. I've also made it easy to distinguish locked slots, although I opted not to have unequipped slots with the same scheme. I found out why the route taken wasn't showing. I also found out that HQ level was not being used in the eLoS equation because of the same reason. This is now fixed. Thank God. Preface As I feel very...uncompelled to do calculations by hand when I'm putting together a fleet composition, I ended up making this. Special thanks to User:Ckwng for putting together all the modules I dipped into. There was a lot of source code to read :3.... Also a special thanks to User:Flonnaru for the inspiration of doing this. I didn't really take anything directly, but his/her template still served as the starting point for making this. The Skeleton The Result Notes If you put "-" for an equipment slot, it will display "- Unequipped -". Alternatively, "!-" will display "- Locked -" for equipment slots that you cannot equip anything on. As the parts that calculate the eLoS and fighter power are in a separate section, it would be hacky to check if the slots were already locked, so please overlook that I'm delegating that part to you. For ease of detection, I've made it mandatory to have the "/" in the ship name and remodel designation. "Regular" is for non-kai. "Kai", "Kai Ni", "zwei" and "drei" are for their respective remodels. The capitalization does matter, so please pay attention to that. Putting a "-" in place of a ship name will use a blank card filler. You can't put a "!" in front of it. Equipment names may differ from the ones you're used to. The most easily notable are radars which adopt a "No. ##" format instead of "Type ##". The full list is available on the Sandbox here. I realized that LoS can increase with level, so now it has a spot on the template. Please remember that LoS of ships is their base LoS, so you must subtract the LoS of equipment they have on. The fleet composition table can be shown with 1, 2 or 3 rows. If you subtract lines from it (that's 10 for 2 ship declarations and 8 equipment declarations), it will cut those off from the resulting table. Might be useful for 1-5 compositions where you only use 4 ships. Category:Blog posts